<layout name="page" />
<block name="content">
	{:widget('page_header/simple',array('name'=>'系统参数','search'=>'N'))}
	<div class="tab-box" style="height:430px;">
		<div class="tab-header">
			<a href="{:url('index')}">基本设置</a>
			<a class="active" href="{:url('weixin')}">微信设置</a>
			<a href="{:url('weixin_menu')}">微信菜单</a>
			<a href="{:url('config')}">系统参数</a>
			<a href="{:url('push')}">推送设置</a>
		</div>
		<div class="tab-content frame" style="margin-top:10px;">
			<form id="form_data" name="form_data" method="post" >
				<input type="hidden" name="data_type" value="weixin">
				<div class="box" style="margin-bottom: 0px;">
					<label class="input-label">微信可信域名*：</label>
					<input class="input" type="text" id="weixin_site_url" name="weixin_site_url" value="{$weixin_data.weixin_site_url}">
				</div>
				<div class="box" style="line-height:21px;height: 21px;font-size:14px;">
					<label class="input-label"></label>
					http://xiaowei.smeoa.com/
				</div>
				<div class="box">
					<label class="input-label text-right" for="weixin_corp_id">CorpID*：</label>
					<input class="input" type="text" id="weixin_corp_id" name="weixin_corp_id" check="required" info="请输入CorpID" value="{$weixin_data.weixin_corp_id}">
				</div>
				<div class="box">
					<label class="input-label text-right" for="weixin_secret">Secret*：</label>
					<input class="input" type="text" id="weixin_secret" name="weixin_secret" check="required" info="请输入Secret" value="{$weixin_data.weixin_secret}">
				</div>
				<div class="box">
					<label class="input-label text-right" for="weixin_token">Token*：</label>
					<input class="input" type="text" id="weixin_token" name="weixin_token" value="{$weixin_data.weixin_token}" >
				</div>
				<div class="box">
					<label class="input-label text-right">EncodingAESKey*：</label>
					<input class="input" type="text" id="weixin_encoding_aes_key" name="weixin_encoding_aes_key" value="{$weixin_data.weixin_encoding_aes_key}">
				</div>
				<div class="box">
					<label class="input-label"></label>
					<a class="btn btn-normal" onclick="save()">保存</a>
				</div>
			</form>
		</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use('global', function() {
			var $ = layui.jquery;
			var fn = {
				save : function() {
					send_form("form_data", "{:url('save')}", "{:url('index')}", function(ret) {
						if (ret.status) {
							layer.msg(ret.info, {
								time : 1200
							}, function() {
								location.reload(true);
							});
						} else {
							layer.msg(ret.info);
							return false;
						}
					});
				}
			};
			win_exp(fn);
		});

	</script>
</block>